package cn.zyq.ykb.service.admin;

import cn.zyq.ykb.beans.admin.Admin;
import cn.zyq.ykb.beans.sys.SysAdmin;
import cn.zyq.ykb.system.common.CacheService;
import cn.zyq.ykb.system.common.PageParam;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;

public interface AdminService extends CacheService<Admin> {
    /**
     * 创建第一个管理员
     *
     * @param param
     * @return
     */
    void addFirst(Admin param);

    void add(Admin param, SysAdmin admin);

    void del(String serviceID, SysAdmin admin);

    void update(Admin param, SysAdmin admin);

    PageInfo<Admin> list(PageParam paramParam, SysAdmin admin);

    Admin detail(String serviceID, SysAdmin admin);

    void resetPwd(Admin param, SysAdmin admin);

    Admin login(Admin param);

    void logout(Admin admin);

    Admin getLoginAdmin(HttpServletRequest request);
}
